import request from '@/utils/request'

// 查询商品规格明细列表
export function listProductSpecItem(query) {
  return request({
    url: '/supplier/productSpecItem/list',
    method: 'get',
    params: query
  })
}

// 查询商品规格明细列表
export function listProductSpecItemByTypeId(typeId) {
  return request({
    url: '/supplier/productSpecItem/listSpec/'+typeId,
    method: 'get'
  })
}

// 查询商品规格明细详细
export function getProductSpecItem(id) {
  return request({
    url: '/supplier/productSpecItem/' + id,
    method: 'get'
  })
}

// 新增商品规格明细
export function addProductSpecItem(data) {
  return request({
    url: '/supplier/productSpecItem',
    method: 'post',
    data: data
  })
}

// 修改商品规格明细
export function updateProductSpecItem(data) {
  return request({
    url: '/supplier/productSpecItem',
    method: 'put',
    data: data
  })
}

// 删除商品规格明细
export function delProductSpecItem(id) {
  return request({
    url: '/supplier/productSpecItem/' + id,
    method: 'delete'
  })
}

// 导出商品规格明细
export function exportProductSpecItem(query) {
  return request({
    url: '/supplier/productSpecItem/export',
    method: 'get',
    params: query
  })
}